<template>
  <div>
    <!-- 浮动导航 -->
    <div class="float-link-container">
      <FloatMallLinkComponent/>
    </div>

    <!-- 页面主体 -->
    <div class="main-container">
      <div class="order-list-container" v-for="item in orderList">
        <!--左侧导航结束-->
        <div class="panel panel-default">
          <div class="panel-heading">
            <p class="panel-title">
              订单号：{{ item.orderItemId }}，下单时间：{{ item.orderItemCreateTime }} ，收货人：{{ item.orderItemUser }}
            </p>
          </div>
          <div class="panel-body">
            <table class="orders-table" width="100%">
              <thead>
              <tr>
                <th width="15%"></th>
                <th width="30%">商品</th>
                <th width="8%">单价</th>
                <th width="8%">数量</th>
                <th width="9%">小计</th>
                <th width="10%">售后</th>
                <th width="10%">状态</th>
                <th width="10%">操作</th>
              </tr>
              </thead>
              <tbody class="orders-body" v-for="innerItem in item.orderItemContentList">
              <tr>
                <td><img :src="innerItem.orderInnerItemImg" class="img-responsive"/></td>
                <td>{{ innerItem.orderInnerItemTitle }}</td>
                <td>¥<span>{{ innerItem.orderInnerItemPrice }}</span></td>
                <td>{{ innerItem.orderInnerItemCount }}件</td>
                <td>¥<span>{{ innerItem.orderInnerItemAmount }}</span></td>
                <td><a href="#">申请售后</a></td>
                <td>
                  <div>已发货</div>
                  <div><a href="orderInfo.html">订单详情</a></div>
                </td>
                <td><a href="#" class="btn btn-default btn-xs">确认收货</a></td>
              </tr>

              </tbody>
            </table>
            <div>
              <span class="pull-right">订单总金额：¥{{ item.orderItemAmount }}</span>
            </div>
          </div>
        </div>

      </div>
    </div>
  </div>

</template>

<script>
import FloatMallLinkComponent from '@/components/FloatMallLinkComponentView.vue';

export default {
  components: {
    FloatMallLinkComponent
  },
  data() {
    return {
      orderList: [
        {
          orderItemId: '111111111',
          orderItemCreateTime: '2018-12-1 17:50:30',
          orderItemUser: '张三',
          orderItemAmount: 616,
          orderItemContentList: [
            {
              orderInnerItemImg: '/images/20200111_CB1C45EC35954CD46AD94B8E2959EFA0.jpg',
              orderInnerItemTitle: '2023年明前春芽绿茶 特级高山有机茶 匠心系列 125克',
              orderInnerItemPrice: 212,
              orderInnerItemCount: 1,
              orderInnerItemAmount: 212

            },
            {
              orderInnerItemImg: '/images/20200111_CB1C45EC35954CD46AD94B8E2959EFA0.jpg',
              orderInnerItemTitle: '2023年明前春芽绿茶 特级高山有机茶 匠心系列 125克',
              orderInnerItemPrice: 212,
              orderInnerItemCount: 1,
              orderInnerItemAmount: 212

            },
            {
              orderInnerItemImg: '/images/20200111_CB1C45EC35954CD46AD94B8E2959EFA0.jpg',
              orderInnerItemTitle: '2023年明前春芽绿茶 特级高山有机茶 匠心系列 125克',
              orderInnerItemPrice: 212,
              orderInnerItemCount: 1,
              orderInnerItemAmount: 212

            }

          ]

        },
        {
          orderItemId: '111111111',
          orderItemCreateTime: '2018-12-1 17:50:30',
          orderItemUser: '张三',
          orderItemAmount: 616,
          orderItemContentList: [
            {
              orderInnerItemImg: '/images/20200111_CB1C45EC35954CD46AD94B8E2959EFA0.jpg',
              orderInnerItemTitle: '2023年明前春芽绿茶 特级高山有机茶 匠心系列 125克',
              orderInnerItemPrice: 212,
              orderInnerItemCount: 1,
              orderInnerItemAmount: 212

            }

          ]
        }
      ]
    }
  },
  methods: {
    loadPageTitle() {
      this.pageTitle = '茶叶商城 - 学茶商城网';
      document.title = this.pageTitle;
    },
    loadDefaultSearchKeywords() {
      let defaultSearchKeywords = '大红袍';
      this.defaultSearchKeywords = defaultSearchKeywords;
    },
    loadSearchSuggestKeywords() {
      let searchSuggestKeywords = ['车载杯', '煮茶壶', '铁观音', '五宝茶', '小青柑', '苦荞茶'];
      this.searchSuggestKeywords = searchSuggestKeywords;
    },


  },
  mounted() {
    this.loadPageTitle();
    this.loadDefaultSearchKeywords();
    this.loadSearchSuggestKeywords();

  },
  created() {

  }
}
</script>

<style>
/*通用的去ul默认格式*/
ul, li {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: #4caf50;;
}

body {
  font-family: "微软雅黑", "黑体";
}

.main-container {
  text-align: left !important;
  width: 1200px;
  margin: 0 auto;
}

.order-list-container {
  margin-top: 24px;
  background-color: #fff;
  -webkit-border-radius: 24px;
  -moz-border-radius: 24px;
  -ms-border-radius: 24px;
  border-radius: 24px;
  overflow: hidden;
}

.panel-default {
  border-color: #ddd;
}

.panel {
  margin-bottom: 20px;
  background-color: #fff;
  border: 1px solid transparent;
  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}

.panel-default > .panel-heading {
  color: #333;
  background-color: #f5f5f5;
  border-color: #ddd;
}

.panel-heading {
  padding: 10px 15px;
  border-bottom: 1px solid transparent;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}

.panel-title {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 16px;
  color: inherit;
}

.panel-body {
  padding: 25px;
}

.img-responsive {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

/*表格文字居中*/
.orders-table {
  text-align: center;
}

/*表头文字居中*/
.orders-table th {
  text-align: center;
}

/*数量数字居中*/
.orders-table input {
  text-align: center;
}

/*每行间隙*/
.orders-table tbody tr {
  border-top: 1px dashed #cccccc;
}

.pull-right {
  float: right !important;
}
</style>
